package com.alex.service;

import java.util.List;

import com.alex.DAO.ITipDAO;
import com.alex.entity.Tip;

public class TipService implements ITipService {
	private ITipDAO tipDAO;
	
	public ITipDAO getTipDAO() {
		return tipDAO;
	}
	public void setTipDAO(ITipDAO tipDAO) {
		this.tipDAO = tipDAO;
	}
	public void save(Tip transientInstance){
		this.tipDAO.save(transientInstance);
	}
	public Tip findById(java.lang.Integer id){
		return this.tipDAO.findById(id);
	}
	public List findListTip(int boardId) throws Exception{
		return this.tipDAO.findListTip(boardId);
	}
	public int findCountTip(int boardId) throws Exception{
		return this.tipDAO.findCountTip(boardId);
	}
	public void delete(int tipid){
		 this.tipDAO.delete(tipid);
	}
	public List findListTipByuserid(int userid) throws Exception{
		return this.tipDAO.findListTipByuserid(userid);
	}
}
